<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<p:dialog id="phieuNhapKhoDialogId" header="Chi tiết phiếu nhập kho" widgetVar="phieuNhapKhoDialog" showEffect="fade"
		hideEffect="fade" resizable="true" modal="true" appendToBody="true" maximizable="true">
		<h:form id="phieuNhapKhoDetailFormId">
			<h:panelGrid id="phieuNhapKhoGridId" columns="2">
				<f:facet name="header">
					<p:messages autoUpdate="true" />
				</f:facet>
				<p:outputLabel value="Mã phiếu*" style="font-weight:bold" />
				<p:inputText value="#{phieuNhapKhoView.editedEntity.code}" />

				<p:outputLabel value="Nhà cung cấp" style="font-weight:bold" />
				<p:inputText value="#{phieuNhapKhoView.editedEntity.nhaCungCap}" />

				<p:outputLabel value="Kho" style="font-weight:bold" />
				<p:selectOneMenu value="#{phieuNhapKhoView.selectedKhoId}">
					<f:selectItem itemLabel="" itemValue="" />
					<f:selectItems var="kho" value="#{phieuNhapKhoView.khos}" itemLabel="#{kho.name}" itemValue="#{kho.id}" />
				</p:selectOneMenu>

				<p:outputLabel value="Ngày tạo" style="font-weight:bold" />
				<p:calendar value="#{phieuNhapKhoView.editedEntity.ngayTao}" />

				<p:outputLabel value="Thông tin" style="font-weight:bold" />
				<p:inputText value="#{phieuNhapKhoView.editedEntity.thongTin}" />

				<p:outputLabel value="Nhân viên" style="font-weight:bold" />
				<p:inputText value="#{phieuNhapKhoView.editedEntity.nhanVien}" />

				<f:facet name="footer">
					<p:commandButton icon="ui-icon-disk" value="Save" action="#{phieuNhapKhoView.saveOrUpdate}" process="@form"
						update="@form"
						oncomplete="if (!args.validationFailed) {phieuNhapKhoDialog.hide(); phieuNhapKhoDetailsCallback();}">
					</p:commandButton>
					<p:commandButton icon="ui-icon-cancel" value="Cancel" immediate="true" onclick="phieuNhapKhoDialog.hide()" />
				</f:facet>
			</h:panelGrid>
		</h:form>
	</p:dialog>

</ui:composition>